using System.Collections.Generic;
using System.Threading;
using FlatRedBall;
using FlatRedBall.Math.Geometry;
using FlatRedBall.ManagedSpriteGroups;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Graphics.Particle;
using FlatRedBall.AI.Pathfinding;
using FlatRedBall.Utilities;
using Texture2D = Microsoft.Xna.Framework.Graphics.Texture2D;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Audio;
using BitmapFont = FlatRedBall.Graphics.BitmapFont;
using FlatRedBall.Localization;

namespace NereusGame
{
	public static partial class GlobalContent
	{
		public static bool IsInitialized { get; private set; }
		public static bool ShouldStopLoading { get; set; }
		static string ContentManagerName = "Global";

        private static Song MenuMusic;

        public static bool Sound { get; set; }

		public static void Initialize ()
		{
			
						IsInitialized = true;
                        MenuMusic = FlatRedBallServices.Load<Song>(@"content/screens/menu/menumusic", ContentManagerName);
                        InitializeAudio();
		}

        public static void InitializeAudio()
        {
            MediaPlayer.Play(MenuMusic);
            MediaPlayer.Volume = .3f;
            MediaPlayer.IsRepeating = true;
            Sound = true;
        }

        public static void MuteAudio()
        {
            MediaPlayer.IsMuted = true;
            Sound = false;
        }

        public static void UnMuteAudio()
        {
            MediaPlayer.IsMuted = false;
            Sound = true;
        }

        public static void StopAudio()
        {
            Sound = false;
            MediaPlayer.Stop();
            MenuMusic.Dispose();
        }

		
	}
}
